6/16/2021

1 Month before Due Date:
Lockdown

Stages of labor and birth:
Baby, it’s time!

Prodromal labor

Early labor

Active labor

3-1-1

Traditionally the 5-1-1 rule is used; that is, when contractions come every 5 minutes, each lasting a full minute, and have been that way for an hour. More recent recommendations are 4-1-1 (four minutes apart) or even 3-1-1 (three minutes apart).

https://www.lamaze.org/stages-of-labor

Monday - 20/04/06:
13 Days Before Due Date

“It’s prodromal labor. Don’t worry about it.”

Wednesday - 20/04/08:
11 Days Before Due Date

Wednesday - 20/04/08:
11 Days Before Due Date

Wednesday - 20/04/08:
11 Days Before Due Date

dat <- read.csv("data/Contraction_Clean.csv", stringsAsFactors = F)
dat$posix <- as.POSIXct(dat$posix)
head(dat)
##                 posix duration frequency
## 1 2020-04-08 10:33:00       72       420
## 2 2020-04-08 10:40:00       28       420
## 3 2020-04-08 10:47:00       57       480
## 4 2020-04-08 10:55:00       60      1260
## 5 2020-04-08 11:16:00       88       660
## 6 2020-04-08 11:27:00       86      1620
dat[11:15,]
##                  posix duration frequency
## 11 2020-04-08 12:56:00       54       720
## 12 2020-04-08 13:09:00       69       720
## 13 2020-04-08 13:22:00       60       600
## 14 2020-04-08 13:33:00       26       840
## 15 2020-04-08 13:47:00       76       240

Wednesday - 20/04/08:
13-1-1

mean.duration <- mean(dat$duration[1:15])
mean.frequency <- mean(dat$frequency[1:15])

The mean duration is 66.27 seconds.

The mean frequency is 764 seconds.

Wednesday - 20/04/08:
11 Days Before Due Date

Plot

dat.plot <- dat[1:15,]
plot(x = dat.plot$posix, y = dat.plot$frequency,
     ylim = c(min(dat.plot$duration, dat.plot$frequency),
              max(dat.plot$duration, dat.plot$frequency)),
     xlab = "Date/Time", ylab = "Length (s)", main = "Labor Frequency/Duration",
     col = rep("#DF536B", nrow(dat.plot)),
     pch = rep(6, nrow(dat.plot)))
points(x = dat.plot$posix, y = dat.plot$duration,
       col = rep("#61D04F", nrow(dat.plot)),
       pch = rep(2, nrow(dat.plot)))

## Wednesday - 20/04/08:
11 Days Before Due Date {.smaller}

Baby will come this weekend.

Thursday - 20/04/09:
10 Days Before Due Date

dat[16:20,]
##                  posix duration frequency
## 16 2020-04-09 08:00:00       75       300
## 17 2020-04-09 08:07:30       36       450
## 18 2020-04-09 08:13:45       83       375
## 19 2020-04-09 08:20:00      101       375
## 20 2020-04-09 08:34:30       78       870
dat[36:40,]
##                  posix duration frequency
## 36 2020-04-09 10:33:00       91       840
## 37 2020-04-09 10:37:00       74       240
## 38 2020-04-09 10:44:00      137       420
## 39 2020-04-09 10:50:30       61       390
## 40 2020-04-09 10:57:15       88       405
dat.plot <- dat[1:40,]

Thursday - 20/04/09:
7-1-1 7-2-1

mean.duration <- mean(dat$duration[16:40])
mean.frequency <- mean(dat$frequency[16:40])

The mean duration is 98.56 seconds.

The mean frequency is 437.4 seconds.

Thursday - 20/04/09:
11 Days Before Due Date

lm

mod.duration <- lm(duration~posix, data = dat.plot)
mod.duration
## 
## Call:
## lm(formula = duration ~ posix, data = dat.plot)
## 
## Coefficients:
## (Intercept)        posix  
##  -6.715e+05    4.233e-04
mod.frequency <- lm(frequency~posix, data = dat.plot)
mod.frequency
## 
## Call:
## lm(formula = frequency ~ posix, data = dat.plot)
## 
## Coefficients:
## (Intercept)        posix  
##   6.767e+06   -4.266e-03

Plot

plot(x = dat.plot$posix, y = dat.plot$frequency,
     ylim = c(min(dat.plot$duration, dat.plot$frequency),
              max(dat.plot$duration, dat.plot$frequency)),
     xlab = "Date/Time", ylab = "Length (s)", main = "Labor Frequency/Duration",
     col = "#DF536B", pch = 6)
points(x = dat.plot$posix, y = dat.plot$duration,
       col = "#61D04F", pch = 2)
abline(a = mod.frequency$coefficients[1], b = mod.frequency$coefficients[2],
       col = "#DF536B")
abline(a = mod.duration$coefficients[1], b = mod.duration$coefficients[2],
       col = "#61D04F")

Thursday - 20/04/09:
11 Days Before Due Date

Thursday - 20/04/09: Estimated 3-2-1

seq.posix <- seq(dat.plot$posix[nrow(dat.plot)], by = "sec", length.out = 86400*3)
freq.diff.311 <- 180 - predict(mod.frequency,
                               newdata = data.frame(posix = seq.posix))
time.311 <- seq.posix[which.min(abs(freq.diff.311))]
time.311
## [1] "2020-04-10 02:13:31 CDT"
duration.311 <- predict(mod.duration, newdata = data.frame(posix = time.311))
duration.311
##       1 
## 124.151

Thursday - 20/04/09:
10 Days Before Due Date

dat[41:46,]
##                  posix duration frequency
## 41 2020-04-09 16:15:00      134       300
## 42 2020-04-09 16:19:15      142       255
## 43 2020-04-09 16:25:30       90       375
## 44 2020-04-09 16:31:30      123       360
## 45 2020-04-09 16:36:45      104       315
## 46 2020-04-09 16:48:45      139       720
tail(dat)
##                  posix duration frequency
## 51 2020-04-09 17:18:25      146       360
## 52 2020-04-09 17:23:40      116       315
## 53 2020-04-09 17:29:10      129       330
## 54 2020-04-09 17:34:10      116       300
## 55 2020-04-09 17:43:10       87       540
## 56 2020-04-09 17:48:10       80       300
dat.plot <- dat

Thursday - 20/04/09:
6-2-1

mean.duration <- mean(dat$duration[41:nrow(dat)])
mean.frequency <- mean(dat$frequency[41:nrow(dat)])

The mean duration is 121 seconds.

The mean frequency is 368.1375 seconds.

Thursday - 20/04/09:
10 Days Before Due Date

Thursday - 20/04/09:
Estimated 3-1-1 3-2-1

freq.diff.311 <- 180 - predict(mod.frequency,
                               newdata = data.frame(posix = seq.posix))
time.311 <- seq.posix[which.min(abs(freq.diff.311))]
time.311
## [1] "2020-04-10 04:52:53 CDT"
duration.311 <- predict(mod.duration, newdata = data.frame(posix = time.311))
duration.311
##        1 
## 137.3447

Friday - 20/04/10:
4:30AM - Water Breaks!

Active Labor!!!

Birthing humans is hard.

It’s harder in a pandemic.

Birth plan changed at lockdown, and then 3 more times in the last few days.

Pro-tip: If you’re going to give birth on a Friday, do it before shift change at 5pm.

Joaquin!

Thank you!